// 1. es6 
let a = 1;
let b = 2;
[a, b] = [b, a];

console.log(a, b);